﻿Sys.Mvc.ValidatorRegistry.validators["corporateEmail"] = function (rule) { 
    var corporateDomain = rule.ValidationParameters["corporateDomain"]; 
    return function (value, context) { 
        if (value.toLowerCase().indexOf(corporateDomain) > -1) 
            return true; 
        else 
            return rule.ErrorMessage; 
        };
};